package com.sz.youban.dt.service.terminal;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sz.youban.dt.entity.terminal.DtTelList;
import com.sz.youban.dt.interfs.terminal.IDtTelListService;
import com.sz.youban.dt.service.terminal.mapper.DtTelListMapper;

/**
 * <p>
 * 手机通讯录信息 服务实现类
 * </p>
 *
 * @author liyang
 * @since 2017-06-05
 */
@Service
public class DtTelListServiceImpl extends ServiceImpl<DtTelListMapper, DtTelList> implements IDtTelListService {
	
	@Autowired
	private DtTelListMapper telListMapper;

	@Override
	public int saveTelList(DtTelList telList_test) {
		
		int result = telListMapper.insert(telList_test);
		return result;
	}

	@Override
	public Map<String, String> selectRecordTime(String appPhone) {

//		List<DtTelList> list = telListMapper.selectByAppPhone(appPhone);
		DtTelList telList = telListMapper.selectByAppPhone(appPhone);

		Map<String,String> map = new HashMap<String,String>();
		if (telList != null){
			map.put("exist","1");
		}else{
			map.put("exist","0");
		}
		map.put("lastTime","");
		return map;
	}

}
